package com.Controller;

import com.Service.UserService;
import com.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class UserController {
    @Autowired
   private UserService userService;

    @RequestMapping("selectuser")
    public String select(){
        List<User> userList = userService.select();
        for (User user:userList
             ) {
            System.out.println(user);
        }
        return "success";
    }
}
